<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title>Simulations for Statistical and Thermal Physics</title>

<link href="../default.css" type="text/css" rel="stylesheet">

</head>

<body>

<h3 style="text-align:center;">Multiple coin toss</h3>

<p class="header_title">Introduction</p>

<p>A Monte Carlo simulation of the statistical properties
of the outcome of tosses of many coins. The probability that an individual coin is heads is p.</p>
<center>
<applet
 code="org.opensourcephysics.davidson.applets.ApplicationApplet.class"
 archive="./stp.jar" codebase="../" align="top" height="40"
 hspace="0" vspace="0" width="150"> <param name="target"
 value="org.opensourcephysics.stp.cointoss.MultipleCoinTossApp"> <param name="title"
 value="Applet"> <param name="singleapp" value="true">
</applet>
</center>

<p class="header_title">Algorithm</p>

<p>For each coin we generate a random number r uniformly in the interval [0, 1]. A coin is heads if r &#8804; p. We simulate the toss of many coins and plot a histogram
of the number of heads on a single toss and compute the average number of heads and the standard
deviation.</p>

<p class="header_title">Questions</p>

<ol>

<li> Run the simulation for p = 1/2 and N = 10, 100, and 1000 coins. Describe the qualitative dependence of the histogram
on the number of coins.</li>

<li>Estimate the width of the histogram. Make a plot of the estimated width versus N. Compare your estimated values to the standard deviation &#963;. What is the functional form of this dependence? How does the relative fluctuations &#963;/&#60;h&#62; depend on N? (The quantity &#60;h&#62; is the mean number of heads in one toss.)</li>

<li> Change the probability of obtaining heads in a single toss to p = 0.8. How does the histogram change? Does the 
histogram have the same shape?</li>



</ol>

<p class="header_title">Java Classes</p>

<ul>
<li>MultipleCoinTossApp</li>
</ul>

<p class = "small">Updated 27 February 2007.</p>
</body>
</html>